<?php
   /*
   * Define 'NO_UP' to not print a link to the up directory.
   *
   * For an example see 'index.php'...
   */
   require_once BASE . 'config.php';
   ?>
<h1 id="title"><a href="<?php echo BASE; ?>">Home</a>
  <?php $emacs=0;

        if (!defined('NO_UP')) {
        echo '| <a href="../">';
        $up = basename(dirname(dirname($_SERVER['SCRIPT_ENAME'])));
        echo $up;
        echo '</a>';
        }
        ?>
  <?php if (useMap()) { ?>
  |
  <a href="<?php echo phpSelf() . '?map'; ?>">Map</a> |
  <a href="<?php echo phpSelf() . '?alphabetical'; ?>">List</a> |
  <a href="<?php echo phpSelf() . '?noiphone'; ?>">Normal</a> |
  <a href="<?php echo phpSelf() . '?table'; ?>">Table</a> |
  <a href="<?php echo phpSelf() . '?search'; ?>">Search</a>
  <?php } ?>
</h1>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>

    <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
    <link rel="stylesheet" href="<?php echo BASE; ?>css/iphone.css" type="text/css" media="screen" />
    <?php
       if (defined('INCLUDE_JS')) {
       echo "\n" . '<script type="text/javascript" src="' . BASE . 'js/prototype.js"></script>';
       echo "\n" . '<script type="text/javascript" src="' . BASE . 'js/main.js" ></script>';
       }

       echo "\n";
       echo '<script type="text/javascript">';
       echo 'var REQUEST = [];';
       foreach ($_REQUEST as $k=>$v) {
    echo 'REQUEST["' . $k . '"] = "' . $v . '";';
    }
    echo '</script>';
?>
<style>
  h1 a {
  text-decoration:bold;
  color:#fff;
  }
</style>
<meta name="generator" content="WordPress 2.3.3" /> <!-- leave this for stats -->
<title><?php echo TITLE; ?></title>
</head>
<body
   <?php
if ($ON_LOAD && !(isSearch() && !isset($_REQUEST['q']))) {
      echo 'onload="' . $ON_LOAD . '"';
      }
      ?>
   >

  <style type="text/css">
    <!--
        .style1 {font-size: 10px}
      -->
  </style>



  <ul id="mainList" title="Home" selected="true">
    <?php if (isSearch() && isInCityDir()) { ?>
    <li class="page-item search-item" >
      <form method="get" action="<?php echo phpSelf(); ?>">
        <input type="text" id="q" name="q" 
               value="<?php echo $_REQUEST['q']; ?>" length="50" />
        <input type="submit" value="Search" />
      </form> 
    </li>
    <?php } ?>
